﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Pages_PersonInsert" Codebehind="UserInsert.aspx.cs" MasterPageFile="~/Pages/Master/MainAdmin.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <fieldset id="pageLoad">
        <div id="fillInData">
           <h1>Cadastro de Usuários</h1>
           <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                CssClass="validation message" />

           <div class="fillInDataField">
                <div class="label">
                    <label for="txbName">Nome</label>
                </div>
                <asp:TextBox ID="txbName" runat="server" CssClass="component medium" MaxLenght="150"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txbName" ErrorMessage="O nome não pode ser nulo" 
                    CssClass="validation">*</asp:RequiredFieldValidator>
           </div>
           
           <div class="fillInDataField">
                <div class="label">
                    <label for="txbEMail">E-mail</label>
                </div>
                <asp:TextBox ID="txbEMail" runat="server" CssClass="component medium" MaxLenght="50"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="txbEMail" ErrorMessage="E-Mail inválido" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    CssClass="validation">*</asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="txbEMail" ErrorMessage="Digite um E-Mail" 
                    CssClass="validation">*</asp:RequiredFieldValidator>
           </div>

           <div class="fillInDataField">
                <div class="label">
                    <label for="ddlUnit">Unidade</label>
                </div>
                <asp:DropDownList ID="ddlUnit" runat="server" 
                    onselectedindexchanged="ddlUnit_SelectedIndexChanged" AutoPostBack="True" 
                    CssClass="component small">
                </asp:DropDownList>
           </div>

           <div class="fillInDataField">
                <div class="label">
                    <label for="ddlSector">Setor</label>
                </div>
                <asp:DropDownList ID="ddlSector" runat="server" CssClass="component small">
                </asp:DropDownList>
            </div>

            <div class="fillInDataField">
                <div class="label">
                    <label for="txbPassword">Senha</label>
                </div>
                <asp:TextBox ID="txbPassword" runat="server" TextMode="Password" 
                    CssClass="component small" MaxLenght="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txbPassword" ErrorMessage="Digite sua senha de acesso" 
                    CssClass="validation">*</asp:RequiredFieldValidator>
            </div>

            <div class="fillInDataField">
                <div class="label">
                    <label for="txbPasswordValidate">Confirma Senha</label>
                </div>
                <asp:TextBox ID="txbPasswordValidate" runat="server" TextMode="Password" 
                    CssClass="component small" MaxLenght="50"></asp:TextBox>
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                    ControlToCompare="txbPasswordValidate" ControlToValidate="txbPassword" 
                    ErrorMessage="as senhas são diferentes" CssClass="validation">*</asp:CompareValidator>
                <asp:DropDownList ID="ddlRegraAcesso" runat="server" CssClass="component small">
                    <asp:ListItem Value="USER">Usuário</asp:ListItem>
                    <asp:ListItem Value="ANALYST">Analista</asp:ListItem>
                    <asp:ListItem Value="TECHNICAL">Técnico</asp:ListItem>
                </asp:DropDownList>
            </div>
                                
            <asp:Button ID="btnInsert" runat="server" Text="Cadastrar" 
                onclick="btnInsert_Click" CssClass="button add" />
        </div>
        </fieldset>
</asp:Content>